GuiXT
// read operation via transaction IW37N
Enter "/niw37n"
// Selection of Orders and Operations
Screen RI_ORDER_OPERATION_LIST.1000
// Sample selection criteria
Set F[Period] "25.02.2000"
Set F[Period to] "31.12.2025"
Enter "=S_TAB9" // goto TAB Miscellaneous
Screen RI_ORDER_OPERATION_LIST.1000
Title "Please wait... Reading operations"
// set GuiXT Layout
Set F[Layout] "/GUIXT"
Enter "/8" // Execute
// List of Orders and Operations
Screen SAPLSLVC_FULLSCREEN.0500
Title "Please wait... Reading operations"
Enter "==%PC" // Use command "==%PC", not "=%PC" !
// Alternative:
// Enter "/Menu=1,11,3"
// popup screen for output selection
Screen SAPLSPO5.0110
// select "clipboard" option
Set R[In the clipboard] "X"
Enter
Screen SAPLSLVC_FULLSCREEN.0500
Title "Please wait... Reading operations"
// read the clipboard into a text variable
CopyText toText="temp" -fromClipboard
// restore the clipboard
CopyText fromText="cbbackup" -toClipboard
// clear table operations
Clear V[operations]
// text lines, skip title and header
Set V[k] 5
label next_line
Set V[k] &V[k] + 1
CopyText fromText="temp" toString="s" line="&V[k]"
if Q[ok]
CopyText fromString="s" toText="cells"
CopyText fromText="cells" toString="operation.aufnr" _
line=3 delimiter="|"
CopyText fromText="cells" toString="operation.ktext" _
line=4 delimiter="|"
CopyText fromText="cells" toString="operation.vornr" _
line=5 delimiter="|"
CopyText fromText="cells" toString="operation.ltxa1" _
line=6 delimiter="|"
CopyText fromText="cells" toString="operation.arbpl" _
line=7 delimiter="|"
CopyText fromText="cells" toString="operation.sttxt" _
line=8 delimiter="|"
// append new table row if all 6 columns found
if Q[ok]
AppendRow V[operation] table=V[operations]
endif
goto next_line
endif
// return to calling transaction
Return